package com.sdry.service.impl.permission;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.sdry.entity.permission.UpmsRole;
import com.sdry.mapper.permission.UpmsRoleMapper;
import com.sdry.service.permission.UpmsRoleService;

/**
 * 
 * @ClassName:UpmsRoleServiceImpl
 * @Description:角色实现
 * @Author tdd
 * @Date 2018年7月30日下午2:59:42
 * @version 1.0
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class UpmsRoleServiceImpl implements UpmsRoleService {
	 /**注入角色Mapper*/
    @Resource UpmsRoleMapper  upmsRoleMapper;
    /**
     * 根据主键拼接的字符串删除 角色返回影响行数
    */
    public Integer delete(String ids) {
        return upmsRoleMapper.delete(ids);
    }
    /**
     * 条件分页查询角色
    */
    public List<UpmsRole> findPageByMution(UpmsRole upmsRole){
        return upmsRoleMapper.findPageByMution(upmsRole);
    }
    /**
     * 插入返回角色id
    */
    public Long insert(UpmsRole upmsRole){
        return upmsRoleMapper.insert(upmsRole);
    }
    /**
     * 条件查询角色
    */
    public List<UpmsRole> queryAllByMution(UpmsRole upmsRole){
        return upmsRoleMapper.queryAllByMution(upmsRole);
    }
    /**
     * 根据id查询角色
    */
    public UpmsRole queryById(Long id){
        return upmsRoleMapper.queryById(id);
    }
    /**
     * 条件查询角色总条数
    */
    public Integer selectCountByMution(UpmsRole upmsRole){
        return upmsRoleMapper.selectCountByMution(upmsRole);
    }
    /**
     * 根据主键更新 角色返回影响行数
    */
    public Integer update(UpmsRole upmsRole){
        return upmsRoleMapper.update(upmsRole);
    }

}